package com.rooster.order.controller;


import com.rooster.goods.entity.Goods;
import com.rooster.order.feign.GoodsFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @Author C_Y_J
 * @create 2021/10/23 14:00
 **/
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private GoodsFeignClient goodsFeignClient;

    @GetMapping("/order1")
    public Goods order1() {
        System.out.println("模拟用户下单查询商品服务1");
        return goodsFeignClient.findGoodsById1();
    }

    @GetMapping("/order2")
    public Goods order2() {
        System.out.println("模拟用户下单查询商品服务2");
        return goodsFeignClient.findGoodsById2();
    }

    @GetMapping("/order3")
    public Goods order3() {
        System.out.println("模拟用户下单查询商品服务3");
        return goodsFeignClient.findGoodsById3();
    }

    @GetMapping("/order4")
    public Goods order4() {
        System.out.println("模拟用户下单查询商品服务4");
        return goodsFeignClient.findGoodsById4();
    }

    @GetMapping("/order5")
    public Goods order5() {
        System.out.println("模拟用户下单查询商品服务5");
        return goodsFeignClient.findGoodsById5();
    }
}
